Game system, program and image generating method

ABSTRACT

An object is to provide a game system, program and image generating method which can effectively generate an image having an edge line of higher quality. The image of an edge line EDL of an object OB is changed depending on a distance between the object and the viewpoint or the size of the perspectively transformed object OB. As the distance between the object and the viewpoint increases or as the size of the perspectively transformed object decreases, the color of the edge line of the object gradually becomes the second color. The color of the edge line begins to become the second color at a threshold value VTN. The color of the edge line is set to the second color at another threshold value VTF. As the distance between the object and the viewpoint increase or as the size of the perspectively transformed object decreases, the image of the edge line of the object is made more transparent. When the distance between the object and the viewpoint (or the size of the object) is substantially equal to a distance in the viewpoint follow mode, the color or translucency of the edge line is maintained substantially constant. When the distance between the object and the viewpoint is at the threshold value VTF, the image of the edge line substantially disappears. The image of the edge line is drawn in the outside or inside area of the object.

TECHNICAL FIELD

[0001] The present invention relates to a game system, program and imagegenerating method.

BACKGROUND OF ART

[0002] There is known a game system which can generate an image asviewed from a given viewpoint within an object space that is a virtualthree-dimensional space. Such a game system is highly popular from thefact that it can provide a so-called virtual reality. If the game systemis for a roll-playing game (RPG), a player can enjoy the game bycontrolling a character (or object) allocated to the player to move iton a map within the object space so that the player will fight againstan enemy character, dialogue with any other character or visit variouscities and towns.

[0003] In such a game system, an object representing a character isconfigured by a plurality of polygons or free-form surfaces (which areprimitive surfaces in a broad sense). The image as viewed from the givenviewpoint within the object space will be generated by arranging theobject (model) configured by these polygons within the object space andthen performing the geometry-processing (or three-dimensionalcomputation) with respect to the object. Thus, the image can begenerated in a more realistic form as if it exists in the real worldscene.

[0004] On the other hand, the field of animated cartoon makes an appealto players by using an image similar to a cellular picture specific tothe animation, rather than a realistic image actually photographed.

[0005] The game picture generated by the conventional game system canmake an appeal to a person that likes the reality, but would not make anappeal to a person that likes the animation.

[0006] To overcome such a problem, the inventors have developed a gamesystem which can generate a cellular image in real-time. The generationof the cellular image requires a process of drawing the edge line of anobject including a character or the like (or a process of emphasizingthe edge line).

[0007] However, it has bee found that such a process contains thefollowing problem.

[0008] It is now assumed that an edge line having its thickness equal toone pixel is to be drawn around the outer periphery of an object. Insuch a case, a problem is not substantially raised if the distancebetween the viewpoint and the object becomes nearer (or if the object islarge relative to pixels on the screen) However, if the distance betweenthe viewpoint and the object is farther (or if the object is smallrelative to pixels on the screen), an unnatural image will be generatedsince the thickness of the edge line will unnecessarily be increasedrelative to the size of the object.

DISCLOSURE OF INVENTION

[0009] The present invention provides a game system which performs imagegeneration, comprising: means which draws an image of an edge line of anobject; means which changes the image of the edge line of the objectdepending on a distance from a viewpoint; and means which generates animage as viewed from a given viewpoint within an object space.

[0010] The present invention further provides a game system whichperforms image generation, comprising: means which draws an image of anedge line of an object; means which changes the image of the edge lineof the object depending on a size of the object that has beenperspectively transformed; and means which generates an image as viewedfrom a given viewpoint within an object space.

BRIEF DESCRIPTION OF DRAWINGS

[0011]FIG. 1 is a functional block diagram of a game system according tothis embodiment of the present invention.

[0012]FIG. 2 is an image generated according to this embodiment.

[0013]FIG. 3 illustrates a problem raised from the fact that if thedistance between an object and the viewpoint increases (or if the sizeof a perspectively transformed object decreases), the edge line of theobject will unnecessarily be conspicuous.

[0014]FIG. 4 illustrates a technique of changing the color of the edgeline depending on the distance between the object and the viewpoint orthe size of the perspectively transformed object.

[0015]FIG. 5A shows the characteristic of a function between thedistance between the object and the viewpoint and the color of the edgeline while

[0016]FIG. 5B shows the characteristic of a function between the size ofthe perspectively transformed object and the color of the edge line.

[0017]FIG. 6 illustrates a technique of changing the translucency of theedge line depending on the distance between the object and the viewpointor the size of the perspectively transformed object.

[0018]FIG. 7A shows the characteristic of a function between thedistance between the object and the viewpoint and the translucency ofthe edge line while

[0019]FIG. 7B shows the characteristic of a function between the size ofthe perspectively transformed object and the translucency of the edgeline.

[0020]FIGS. 8A and 8B illustrate a technique of setting a thresholdvalue VTN.

[0021]FIGS. 9A and 9B illustrate a problem raised in a technique ofcontrolling the color of the edge line.

[0022]FIGS. 10A and 10B illustrate a technique of drawing edge linesalong the outside and inside areas of the edge of an object.

[0023]FIGS. 11A and 11B illustrate a problem raised if an edge line isto be drawn along the outside area of edge of the object.

[0024]FIG. 12 illustrates the bi-linear filtering type texture mapping.

[0025]FIG. 13A shows a mapping image while FIG. 13B shows an imageobtained by mapping the mapping image on a virtual polygon.

[0026]FIG. 14 illustrates a technique of generating the image of an edgeline by effectively using the bi-linear filtering type texture mapping.

[0027]FIG. 15 illustrates the principle of a phenomenon in which thecolor of each pixel exudes into the surrounding region through thebi-linear filtering type interpolation.

[0028]FIGS. 16A and 16B illustrate a technique of generating a virtualpolygon.

[0029]FIGS. 17A and 17B illustrate a technique of generating a virtualpolygon based on the coordinates of vertexes in a perspectivelytransformed object.

[0030]FIGS. 18A and 18B illustrate a technique of generating a virtualpolygon based on the coordinates of vertexes in a perspectivelytransformed simplified object.

[0031]FIG. 19 shows a mapping image generated on a work buffer.

[0032]FIG. 20 illustrates a technique of drawing a mapping image on aframe buffer by mapping it on a virtual polygon through the bi-linearfiltering process while shifting the texture coordinates.

[0033]FIG. 21 shows an image generated on the frame buffer through thetechnique of FIG. 20.

[0034]FIG. 22 illustrates a technique of interpolating the RGBs andalpha (α) values of pixels through the bi-linear filtering process.

[0035]FIGS. 23A and 23B illustrate a technique of generating the imageof an edge line of an object.

[0036]FIG. 24 illustrates a technique of preventing the whole objectfrom being drawn into a defocused image.

[0037]FIG. 25 shows an alpha plane generated on the frame buffer.

[0038]FIG. 26 shows an-original object image and alpha plane generatedon the frame buffer.

[0039]FIG. 27 illustrates a technique of drawing a mapping image on theframe buffer by mapping it on a virtual polygon through the bi-linearfiltering process while shifting the texture coordinates by +0.5 pixels.

[0040]FIG. 28 shows an image generated on the frame buffer through thetechnique of FIG. 27.

[0041]FIG. 29 illustrates a technique of generating the image of an edgeline of an object.

[0042]FIG. 30 illustrates a technique of drawing a mapping image on theframe buffer by mapping it on a virtual polygon through the bi-linearfiltering process while shifting the texture coordinates by −0.5 pixels.

[0043]FIG. 31 shows a final image generated on the frame buffer throughthe technique of FIG. 30.

[0044]FIG. 32 is a flowchart illustrating the details of the processaccording to this embodiment.

[0045]FIG. 33 is a flowchart illustrating the details of the processaccording to this embodiment.

[0046]FIG. 34 is a flowchart illustrating the details of the processaccording to this embodiment.

[0047]FIG. 35 is a flowchart illustrating the details of the processaccording to this embodiment.

[0048]FIG. 36 is a flowchart illustrating the details of the processaccording to this embodiment.

[0049]FIG. 37 is a flowchart illustrating the details of the processaccording to this embodiment.

[0050]FIG. 38 is a flowchart illustrating the details of the processaccording to this embodiment.

[0051]FIG. 39 is a flowchart illustrating the details of the processaccording to this embodiment.

[0052]FIG. 40 shows a hardware structure by which this embodiment can berealized.

[0053]FIGS. 41A, 41B and 41C show various system forms to which thisembodiment can be applied.

[0054]FIGS. 42A to 42F illustrate various other techniques of drawingthe edge line.

[0055]FIGS. 43A and 43B shows another characteristic of a functionbetween the distance between the object and the viewpoint, the size ofthe perspectively transformed object and the color and translucency ofthe edge line.

BEST FORMS FOR CARRYING OUT THE INVENTION

[0056] In view of the aforementioned problems, one embodiment of thepresent invention provides a game system, program and image generatingmethod which can effectively generate the image of an edge line withhigher quality.

[0057] Embodiments of the present invention will now be described.

[0058] The embodiments are not intended to limit the contents of thepresent invention as defined in the appending claims. Moreover, all thecomponents described in connection with the embodiments are notnecessarily essential for carrying out the present invention.

[0059] An embodiment of the present invention provides a game systemwhich performs image generation, comprising: means which draws an imageof an edge line of an object; means which changes the image of the edgeline of the object depending on a distance from a viewpoint; and meanswhich generates an image as viewed from a given viewpoint within anobject space. A computer-usable program embodied on an informationstorage medium or in a carrier wave according to this embodiment of thepresent invention comprises a processing routine for executing theabove-described means.

[0060] According to this embodiment, the image of the edge line changesin respect to any of various parameters thereof such as color,translucency (density), brightness, tint, lightness or chroma, dependingon the distance from the viewpoint. Thus, the image of the edge line canbe formed into a high-quality image optimally matching the distance fromthe viewpoint.

[0061] The distance from the viewpoint may be any of various parameterssuch as depth distance, linear distance between the viewpoint and theobject and other equivalent distances.

[0062] The object, the edge line of which is to be drawn, may be theentire model object or an object part (or sub-object) that is one ofparts objects configuring a model object.

[0063] The technique of drawing the edge line of the object is desirablyone that shifts the texture coordinates through the texel interpolation,but not limited to such a technique.

[0064] In the game system, program and image generating method accordingto this embodiment, as the distance from the viewpoint increases, acolor of the edge line of the object may gradually become a given secondcolor Thus, the color of the edge line of the object may become thesecond or inconspicuous color when the distance between the object andthe viewpoint increases.

[0065] In the game system, program and image generating method accordingto this embodiment, when the distance from the viewpoint issubstantially equal to a distance when the viewpoint follows the objectwhile maintaining a substantially constant distance from the object, thecolor of the edge line of the object may be maintained substantiallyconstant. Thus, in a mode in which the viewpoint follows the objectwhile maintaining the distance between the object and the viewpointsubstantially constant, the color of the edge line of the object hardlychanges, thereby generating a more natural image.

[0066] In the game system, program and image generating method accordingto this embodiment, the color of the edge line of the object may be setto the second color when the distance from the viewpoint becomes largerthan a given threshold value. Thus, the aforementioned problem that therelative thickness of the edge line will be more conspicuous can surelybe prevented by setting the color of the edge line to the second colorwhen the distance between the object and the viewpoint becomes largerthan the given threshold value.

[0067] In the game system, program and image generating method accordingto this embodiment, as the distance from the viewpoint increases, theimage of the edge line of the object may gradually become moretransparent. Thus, the image of the edge line can be made moreinconspicuous by decreasing the density in the image of the edge line asthe distance between the object and the viewpoint increases.

[0068] In the game system, program and image generating method accordingto this embodiment, when the distance from the viewpoint issubstantially equal to a distance when the viewpoint follows the objectwhile maintaining a substantially constant distance from the object, atranslucency of the edge line of the object may be maintainedsubstantially constant Thus, in a mode in which the viewpoint followsthe object while maintaining the distance between the object and theviewpoint substantially constant, the translucency (density) of the edgeline of the object hardly changes, thereby generating a more naturalimage.

[0069] In the game system, program and image generating method accordingto this embodiment, the image of the edge line of the object maysubstantially disappear when the distance from the viewpoint becomeslarger than a given threshold value. Thus, the aforementioned problemthat the relative thickness of the edge line will be more conspicuouscan surely be prevented by making the image of the edge line completelytransparent when the distance between the object and the viewpointbecomes larger than the given threshold value.

[0070] An embodiment of the present invention further provides a gamesystem which performs image generation, comprising: means which draws animage of an edge line of an object; means which changes the image of theedge line of the object depending on a size of the object that has beenperspectively transformed; and means which generates an image as viewedfrom a given viewpoint within an object space. A computer-usable programembodied on an information storage medium or in a carrier wave accordingto this embodiment of the present invention comprises a processingroutine for executing the above-described means.

[0071] According to this embodiment, the image of the edge line changesin respect to any of various parameters thereof such as color,translucency (density), brightness, tint, lightness or chroma, dependingon the size of the perspectively transformed object (size relative tothe pixel). Thus, the image of the edge line can be formed into ahigh-quality image optimally matching the size of the object.

[0072] The size of the object may be any of various parameters such asthe total number of pixels in the object (or the number of longitudinalpixels×the number of transverse pixels), the number of longitudinalpixels, the number of transverse pixels and so on.

[0073] Alternatively, the size of the object may be that of a virtualobject which encloses the image of the perspectively transformed objectand the size of which changes depending on the size of the perspectivelytransformed object.

[0074] In the game system, program and image generating method accordingto this embodiment, as the size of the perspectively transformed objectdecreases, color of the edge line of the object may gradually become agiven second color. Thus, the color of the edge line of the object maybecome the second or inconspicuous color when the size of the object onthe screen becomes smaller.

[0075] In the game system, program and image generating method accordingto this embodiment, when the size of the perspectively transformedobject is substantially equal to a size of the object when the viewpointfollows the object while maintaining a substantially constant distancefrom the object, the color of the edge line of the object may bemaintained substantially constant. Thus, in a mode in which theviewpoint follows the object while maintaining the distance between theobject and the viewpoint substantially constant, the color of the edgeline of the object hardly changes, thereby generating a more naturalimage.

[0076] In the game system, program and image generating method accordingto this embodiment, the color of the edge line of the object may be setto the second color when the size of the perspectively transformedobject becomes smaller than a given threshold value. Thus, theaforementioned problem that the relative thickness of the edge linebecomes more conspicuous can surely be prevented by setting the color ofthe edge line to the second color when the size of the perspectivelytransformed object becomes smaller than a given threshold value.

[0077] In the game system, program and image generating method accordingto this embodiment, as the size of the perspectively transformed objectdecreases, the image of the edge line of the object may gradually becomemore transparent. Thus, when the size of the object on the screen issmaller, the image of the edge line can be made more inconspicuous bydecreasing the density of the image of the edge line of the object.

[0078] In the game system, program and image generating method accordingto this embodiment, when the size of the perspectively transformedobject is substantially equal to a size of the object when the viewpointfollows the object while maintaining a substantially constant distancefrom the object, a translucency of the edge line of the object may bemaintained substantially constant. Thus, in a mode in which theviewpoint follows the object while maintaining the distance between theobject and the viewpoint substantially constant, the translucency(density) of the edge line of the object hardly changes, therebygenerating a more natural image.

[0079] In the game system, program and image generating method accordingto this embodiment, the image of the edge line of the object maysubstantially disappear when the size of the perspectively transformedobject becomes smaller than a given threshold value. Thus, theaforementioned problem that the relative thickness of the edge line willbe more conspicuous can surely be prevented by making the image of theedge line completely transparent when the size of the object becomessmaller than the given threshold value.

[0080] In the game system, program and image generating method accordingto this embodiment, the image of the edge line of the object may bedrawn in an outside area of edge of the object. In this case, it isdesirable to use a technique of changing the color of the edge linedepending on the distance from the viewpoint or the size of theperspectively transformed object when the edge line is drawn in theoutside area of the edge of the object.

[0081] If the edge line is to be drawn in the outside area of the edgeof the object, at least part of the edge line may be drawn in theoutside area of the edge while the other edge line part may he drawn inthe inside area of the edge.

[0082] In the game system, program and image generating method accordingto this embodiment, the image of the edge line of the object may bedrawn in an inside area of edge of the object. In this case, it isdesirable to take a technique of changing the translucency (density) ofthe edge line depending on the distance from the viewpoint or the sizeof the perspectively transformed object when the edge line is drawn inthe inside area of the edge of the object.

[0083] The preferred embodiment of the present invention will bedescribed in more detail with reference to the drawings.

[0084] 1. Configuration

[0085]FIG. 1 shows a block diagram of a game system (image generatingsystem) according to this embodiment. In this figure, this embodimentmay comprise at least a processing section 100 (or a processing section100 with a storage section 170). Each of the other blocks may take anysuitable form.

[0086] A control section 160 is used to input operational data from theplayer and the function thereof may be realized through any suitablehardware means such as a lever, a button, a housing or the like.

[0087] The storage section 170 provides a working area for theprocessing section 100, communication section 196 and others. Thefunction thereof may be realized by any suitable hardware means such asRAM or the like.

[0088] An information storage medium (which may be a computer-usablestorage medium) 180 is designed to store information including programs,data and others. The function thereof may be realized through anysuitable hardware means such as optical memory disk (CD or DVD),magneto-optical disk (MO), magnetic disk, hard disk, magnetic tape,memory (ROM) or the like. The processing section 100 performs variousprocessings in the present invention (or this embodiment) based on theinformation that has been stored in this information storage medium 180.In other words, the information storage medium 180 stores various piecesof information (or programs and data) for executing the means of thepresent invention (or this embodiment) which are particularlyrepresented by the blocks included in the processing section 100.

[0089] Part or the whole of the information stored in the informationstorage medium 180 will be transferred to the storage section 170 whenthe system is initially powered on. The information stored in theinformation storage medium 180 may contain at least one of program codeset for processing the present invention, image data, sound data, shapedata of objects to be displayed, table data, list data, information forinstructing the processings in the present invention, information forperforming the processings according to these instructions and so on.

[0090] A display section 190 is to output an image generated accordingto this embodiment and the function thereof can be realized by anysuitable hardware means such as CRT, LCD or HMD (Head-Mount Display).

[0091] A sound output section 192 is to output a sound generatedaccording to this embodiment and the function thereof can be realized byany suitable hardware means such as speaker.

[0092] A portable information storage device 194 is to store theplayer's personal data and save data and may be take any suitable isform such as memory card, portable game machine and so on.

[0093] A communication section 196 is designed to perform variouscontrols for communication between the game system and any externaldevice (e.g., host device or other image generating system). Thefunction thereof may be realized through any suitable hardware meanssuch as various types of processors or communication ASIS or accordingto any suitable program.

[0094] The program or data for executing the means in the presentinvention (or this embodiment) may be delivered from an informationstorage medium included in a host device (or server) to the informationstorage medium 180 through a network and the communication section 196.The use of such an information storage medium in the hose device (orserver) falls within the scope of the invention.

[0095] The processing section (processor) 100 is to perform variousprocessings such as game processing, image generating or soundgenerating, based on the control data or program from the controlsection 160. The function of the processing section 100 may be realizedby any suitable processor (CPU, DSP or the like), any suitable hardwaremeans such as ASIC (gate array or the like) or a given program (gameprogram).

[0096] The processing section 100 may be designed to perform variousprocesses such as coin (or charge) reception, setting of various modes,game proceeding, setting of scene selection, determination of theposition and rotation angle (about X-, Y- or Z-axis) of an object,movement of the object (motion processing), determination of theposition of the viewpoint (or virtual camera) and the angle of visualline (or the rotational angle of the virtual camera), arrangement of theobject within the object space, hit checking, computation of the gameresults (or scores), processing for causing a plurality of players toplay in a common game space and various other game processings includinggame-over.

[0097] The processing section 100 generates an image as viewed from agiven viewpoint (or virtual camera) within the object space, based onthe aforementioned game processing results and then outputs it towardthe display section 190.

[0098] The processing section 100 further performs various soundprocessings to generate BGMs, sound effects or voices, based on theaforementioned game processing results and then outputs the soundstoward the sound output section 190.

[0099] All the functions of the image and sound processing sections 140,150 may be realized by any suitable hardware means or according to theprogram. Alternatively, these functions may be realized by both thehardware means and program.

[0100] The processing section 100 comprises a geometry-processingsection 110, a virtual object generating section 112, an edge-line imagechanging section 114 and a drawing section 120.

[0101] The geometry-processing section 110 is to perform variousgeometry-processings (or three-dimensional computation) such ascoordinate transformation, clipping, perspective transformation orlight-source computation with reference to the object. The resultingdrawing data (such as vertex coordinates, texture coordinates, color(brightness) data, normal vector or alpha value) is stored and saved ina main storage section 172 of the storage section 170.

[0102] The virtual object generating section 112 is to generate avirtual object onto which a mapping image is to be mapped. This mappingimage is generated by a mapping image generating section 122 included inthe drawing section 120 as will be described later.

[0103] In this embodiment, this virtual object (which is, in a narrowsense, a virtual polygon) is one that encloses the whole or part of theimage of an object after perspectively transformed or transformed intothe screen coordinate system and that changes its size depending on thesize of the perspectively transformed object. In other words, the sizeof the virtual object changes depending on the screen area occupied bythe object. The mapping image generated by the mapping image generatingsection 122 will be mapped onto such a virtual object. Therefore, thetexture mapping and virtual object drawing processes can moreeffectively be performed.

[0104] The edge-line image changing section 114 is to change the imageof an edge line to be applied to the object depending on the distancebetween the object and the viewpoint or the size of the perspectivelytransformed object (size relative to the pixel).

[0105] More particularly, the edge-line image changing section 114 is toperform a process of making the color of the edge line a given secondcolor (which includes a process of setting first and second colors, aprocess of determining an interpolation coefficient used to interpolatebetween the first and second colors and other processes), depending onthe distance between the object and the viewpoint or the size of theperspectively transformed object (or the size of the object on thescreen).

[0106] Alternatively, the edge-line image changing section 114 maytransparentize the image of the edge line of the object, depending onthe distance between the object and the viewpoint or the size of theobject. In other words, the edge-line image changing section 114 mayperform a process of synthesizing the images of the object and its edgeline together to form a translucent synthesized image having itstranslucency which is determined depending on the distance between theobject and the viewpoint or the size of the perspectively transformedobject. including a process of determining the translucency, a processof determining the order of drawing and so on.

[0107] The drawing section (or object/edge-line drawing section) 120 isto draw a geometry-processed object (model) or the edge line of theobject in a drawing region 174 which can store the image information bypixel, such as frame buffer or work buffer.

[0108] More particularly, the drawing section 120 performs the drawingprocess so that the image of the edge line generated by the image of theobject (e.g. the image of the perspectively transformed object or theimage of the object on the drawing region) will be drawn in the outsideor inside area of the edge of the object.

[0109] The drawing section 120 comprises a mapping image generatingsection 122, a texture mapping section 130, a synthesizing section 132and a hidden-surface removal section 134.

[0110] The mapping image generating section 122 is to generate a mappingimage which includes object color information set relative to the insidearea of the edge of the object and edge color information set relativeto the outside area of the edge of the object.

[0111] The texture mapping section 130 is to map a texture stored in atexture storage section 176 onto the object.

[0112] More particularly, the texture mapping section 130 performs aprocess of mapping the mapping image generated by the mapping imagegenerating section 122 onto a virtual object generated by the virtualobject generating section 112. At this time, the texture mapping section130 maps the generated mapping image onto the virtual object through thetexel interpolation (which is, in a narrow sense, a bi-linear filter)while shifting the texture coordinates, for example, by a value smallerthan one texel (or pixel). For example, the texture coordinates may beshifted from such texture coordinates as obtained based on the positionin which the mapping image is drawn. Thus, the edge line of the objectcan be drawn with reduced processing load.

[0113] The synthesizing section 132 is to perform a mask process or atranslucence processing using an alpha (α) value. The alpha value(A-value) is information stored relating to each of the pixels. Forexample, the alpha value may be additional information other than colorinformation. The alpha value can be used as mask information,translucency (which is equivalent to transparency or opacity), bumpinformation and so on.

[0114] The hidden-surface removal section 134 is to use z-buffer (orz-plane) storing Z-value (or depth value) for performing thehidden-surface removal according to the algorism of Z-buffer process.

[0115] For example, in the case that the edge line is to be drawn in theoutside area of the edge of the object, it is desirable that a Z-valueobtained based on the object information (vertex coordinates or thelike) is first set relative to a virtual object and that the virtualobject is then subjected to the hidden-surface removal based on the setZ-value. Thus, the optimum Z-value enabling the proper hidden-surfaceremoval can be set relative to the edge line through a simplifiedprocedure in which the z-value (or depth value) obtained from the objectinformation is simply set relative to the virtual object.

[0116] On the other hand, in the case that the edge line is to be drawnin the inside area of the edge of the object, it is desirable that theZ-value of the object in the position in which the edge line is to bedrawn is set as that of the edge line for performing the hidden-surfaceremoval for the edge line. Thus, the optimum Z-value can be set relativeto the edge line to realize the proper hidden-surface removal betweenthat object and another object.

[0117] The hidden-surface removal may be performed through the. depthsorting process (or Z sorting process) in which primitive surfaces aresorted depending on the distance between the object and the viewpoint,thereby drawing the primitive surfaces sequentially starting from thefarthest primitive surfaces relative to the viewpoint.

[0118] The game system of this embodiment may be dedicated for asingle-player mode in which only a single player can play the game ormay have a multi-player mode in which a plurality of players can playthe game.

[0119] If a plurality of players play the game, only a single terminalmay be used to generate game images and sounds to be provided to all theplayers. Alternatively, a plurality of terminals interconnected througha network (transmission lien or communication line) may be used in thepresent invention.

[0120] 2. Features of This Embodiment

[0121] 2.1 Process of Changing the Image of the Edge Line

[0122]FIG. 2 shows a game image generated by the game system accordingto this embodiment. As shown in FIG. 2, this embodiment successfullygenerates a cellular picture-like image familiar to many people throughthe animated cartoon by drawing a thick edge line along the edge of anobject OB configured by polygons.

[0123] However, it has been found that such an edge-line drawing processraised a problem in that if the distance between the object and theviewpoint is farther (or the size of the perspectively transformedobject is smaller), the relative thickness of the edge lineunnecessarily becomes conspicuous (or is unnecessarily emphasized).

[0124] In a three-dimensional game, the viewpoint of a player (orvirtual camera) is moved to an arbitrary position depending on theoperational input from the player. Thus, an object representing acharacter is correspondingly moved to an arbitrary position. This meansthat the distance between the player's viewpoint and the object is alsovariable to change the size of the perspectively transformed object (orthe relative size of the object relative to the pixel on the screen).

[0125] If an edge line having its constant thickness (e.g., one pixel)is to be drawn relative to an object having its variable size, thefollowing problem will be raised.

[0126] If the distance between the viewpoint and the object OB is nearer(e.g., the screen area occupied by the object being larger) as shown byA1 in FIG. 3, the edge line EDL of the object is not very conspicuous,thereby providing a natural image.

[0127] However, if the distance between the viewpoint and the object OBis farther (e.g., the screen area occupied by the object being smaller)as shown by A2 and A3 in FIG. 3, the edge line EDL of the object isunnecessarily conspicuous, thereby providing an unnatural image.

[0128] Particularly, if the total number of pixels in the object OB (thenumber of longitudinal pixels×the number of transverse pixels) becomesequal to 1 to 10 pixels as shown by A3, the object OB will be looked asif it is filled with the color of the edge line EDL. If the color of theobject OB is red while the color of the edge line EDL is black, theimage of the object OB, which should inherently be looked to be red,will be looked as if it is a black-colored spot.

[0129] To overcome this problem, this embodiment changes the image ofthe edge line of the object, depending on the distance between theobject and the viewpoint or the size of the perspectively transformedobject. In this case, the technique of changing the image of the edgeline may be either of a technique of changing the color of the edge lineor a technique of changing the translucency (density) of the edge line.

[0130] 2.2 Process of Changing the Color of the Edge Line

[0131] When the color of the edge line is to be changed, it maygradually become a given second color as the distance between the objectand the viewpoint increases or as the size of the perspectivelytransformed object (or the size of the object relative to the pixel)decreases.

[0132] More particularly, as shown by B1 and B2 in FIG. 4, the color ofthe edge line EDL is determined through the interpolation between firstand second colors so that the color of the edge line EDL on the objectOB gradually changes from the first or deeper color to the second orthinner color, as the distance between the object and the viewpointincreases (or the size of the perspectively transformed objectdecreases) As the distance between the object and the viewpoint issufficiently farther (or the size of the perspectively transformedobject is sufficiently smaller), the color of the edge line EDL will bevery thin second color, as shown by B3.

[0133] As will be apparent from the comparison between A2 of FIGS. 3 andB3 of FIG. 4, this can overcome such a problem that the thickness of theedge line EDL is unnecessarily conspicuous. As will also be apparentfrom the comparison between A3 of FIG. 3 and B3 of FIG. 4, such aproblem that the object OB is looked as if it is filled with the colorof the edge line EDL can also be overcome. If it is assumed, forexample, that the color of the object OB is red while the color of theedge line EDL is black, the color of the object OB will not be filledwith the black color, thereby providing a more natural image, eventhough the distance between the object and the viewpoint sufficientlyincreases.

[0134] The technique of controlling the color of the edge line dependingon the distance between the object and the viewpoint or the size of theobject may be any of various techniques.

[0135] If it is assumed, for example, that the distance between theobject and the viewpoint becomes larger than a threshold value VTN asshown in FIG. 5A, the nearer-range or first color CN of the edge linebegins to change gradually becomes the farther-range or second color CF.Thus, the edge line will gradually be inconspicuous.

[0136] When the distance between the object and the viewpoint is largerthan another threshold value VTF, the color of the edge line is set tothe farther-range color CF The color of the edge line of the object isvery thinned as shown by B3 in FIG. 4. Thus, such a problem that theobject will be looked as if it is filled with the color of the edge linecan be overcome.

[0137] In FIG. 5B, the nearer-range color CN of the edge line begins tochange gradually into the farther-range color CF when the size of theobject becomes smaller than the threshold VTN.

[0138] When the size of the object becomes smaller than the thresholdVTF, the color of the edge line is set to CF. Thus. the edge line of theobject is very thinned as shown by B3 in FIG. 4.

[0139] By changing the color of the edge line depending on the distancebetween the object and the viewpoint or the size of the perspectivelytransformed object in the aforementioned manner, the problem describedin connection with FIG. 3 can be overcome.

[0140] 2.3 Process of Changing the Translucency of the Edge Line

[0141] When the translucency of the edge line is to be changed, theimage of the edge line is made more transparent as the distance betweenthe object and the viewpoint increases or as the size of theperspectively transformed object decreases. For example, the image ofthe object may be translucent-synthesized (or alpha blending) with theimage of the edge line of the object using a translucency (which isequivalent to transparency or opacity) determined by the distancebetween the object and the viewpoint or the size of the perspectivelytransformed object.

[0142] More particularly, as shown by C1 and C2 in FIG. 6, the edge lineEDL is made more transparent by changing the translucency of the edgeline EDL of the object OB as the distance between the object and theviewpoint increases (or as the size of the perspectively transformedobject decreases). If the distance between the object and the viewpointsufficiently increases (or the size of the perspectively transformedobject sufficiently decreases), the image of the edge line EDLsubstantially disappears, as shown by C3.

[0143] As will be apparent from the comparison between A2 of FIG. 3 andC2 of FIG. 6, this can overcome such a problem that the thickness of theedge line EDL is unnecessarily conspicuous. As will also be apparentfrom the comparison between A3 of FIG. 3 and C3 of FIG. 6, such aproblem that the object OB will be looked as if it is filled with thecolor of the edge line EDL can also be overcome. If it is assumed, forexample, that the color of the object OB is red while the color of theedge line EDL is black, the color of the object OB is represented by itsinherent red color without being filled with the black color, therebyproviding a more natural image, even though the distance between theobject and the viewpoint sufficiently increases.

[0144] The technique of controlling the translucency of the edge linedepending on the distance between the object and the viewpoint or thesize of the object may be any of various techniques.

[0145] For example, if the distance between the object and the viewpointis larger than the threshold value VTN as shown in FIG. 7A, thetranslucency αT begins to change starting from its nearer-rangetranslucency αTN. Thus, the edge line of the object begins to betransparent. As a result, the edge line will gradually be inconspicuous.

[0146] When the distance between the object and the viewpoint is largerthan the threshold value VTF, the translucency αT is set to thefarther-range translucency αTF. Thus, the edge line of the object ismade completely transparent (or disappears) as shown by C3 in FIG. 6. Asa result, such a situation that the object is filled with the color ofthe edge line can be avoided.

[0147]FIG. 7B shows that as the size of the object is smaller than thethreshold value VTN, the translucency αT begins to change starting fromits nearer-range translucency αTN. Thus, the edge line of the objectbegins to be transparent.

[0148] When the size of the object is smaller than the threshold valueVTF, the translucency αT is set to the farther-range translucency αTF.At this time, the edge line of the object will be completely transparent(or disappears) as shown by C3 in FIG. 6.

[0149] By changing the translucency of the edge line depending on thedistance between the object and the viewpoint or the size of theperspectively transformed object in the aforementioned manner, theproblem described in connection with FIG. 3 can effectively be overcome.

[0150] Although it is particularly desirable from the viewpoint ofprocessing load reduction that the distance from the viewpoint describedin connection with FIGS. 5A and 7A is the depth distance (or z-value) ofthe object (or its representative point), the present invention is notlimited to such an aspect. For example, it may be the linear distancebetween the viewpoint and the object. Alternatively, the distance fromthe viewpoint may be any of various other parameters which can providethe similar effect as in the depth distance or linear distance.

[0151] Although it is desirable from the viewpoint of processing loadreduction that the size of the object described in connection with FIGS.5B and 7B is represented by the total number of pixels (the number oflongitudinal pixels×the number of transverse pixels) in the object, thepresent invention is not limited to such an aspect. For example, thesize of the object may be represented by either of the number oflongitudinal pixels or the number of transverse pixels. Alternatively,the size of the object may be represented by any of various otherparameters which can provide the similar effect as in the number ofpixels.

[0152] 2.4 Setting of the Color and Translucency

[0153] When the object OB moves in the three-dimensional game, theviewpoint VP (or virtual camera) frequently follows the object OB whilemaintaining a substantially constant distant ZVB between the object OBand the viewpoint VP, as shown in FIG. 8A.

[0154] In such situation, if the color or the translucency of the edgeline is frequently variable depending on the distance between the objectand the viewpoint or the size of the object as shown in FIGS. 4 and 6,an image looked to be unnatural for a player will be generated.

[0155] To overcome such a problem, this embodiment maintains the coloror translucency of the edge line of the object OB substantially constantif the distance between the object OB and the viewpoint VP issubstantially equal to a distance ZVB held when the viewpoint VP followsthe object OB (which will be referred to “the follow mode”).Alternatively, the color or translucency of the edge line of the objectOB is maintained substantially constant if the size of the perspectivelytransformed object OB is equal to that of the object in the follow mode(or the size of the object in the distance ZVB). More particularly, thethreshold value VTN has been set at a distance larger than the distanceZVB (or a value smaller than the size of the object OB in the followmode). As will be apparent from the functional characteristics of FIGS.5A, 5E, 7A and 7B, thus, the color or translucency of the edge line willnot change in the follow mode. This can overcome the aforementionedproblem that an unnatural image will be generated in the follow mode.

[0156] If there occurs any event releasing the follow mode and when thedistance between VP and OB becomes larger than the threshold value VTN(or the size of the object decreases), the color or translucency of theedge line will change depending on the distance between the object OBand the viewpoint VP or the size of the object OB as shown in FIGS. 4and 6. This can overcome such a problem that the occurrence of theaforementioned event increase the distance between the viewpoint and theobject to made the relative thickness of the edge line unnecessarilyconspicuous.

[0157] When the upper threshold value VTF (or a given threshold value)is set as shown in FIGS. 5A, 5B, 7A and 7B, the following advantages canbe provided.

[0158] If the edge line EDL is not colored by the second or thinnercolor or if the edge line EDL is not completely transparentized when thesize of the object OB decreases as shown by A3 of FIG. 3, there will begenerated an unnatural image in which the object OB is looked as if itis filled with the color of the edge line EDL.

[0159] The threshold value VTF has been set such value that the color ofthe edge line EDL is the second or thinner color or the edge line EDL iscompletely transparentized when the size of the object OB is as shown byA3 of FIG. 3. Thus, when the size of the object OB is as shown by A3 ofFIG. 3, the edge line EDL becomes inconspicuous as shown by B3 of FIG. 4or C3 of FIG. 6. This can prevent such a problem that such an unnaturalimage as shown by A3 of FIG. 3 will be generated.

[0160] By changing the color or translucency of the edge line betweenthe threshold values VTN and VTF, there can be overcome such a problemthat the player can know when the color or translucency of the edge linechanges.

[0161] 2.5 Advantages and Problems

[0162] The technique of controlling the color of the edge line shown inFIGS. 4 to 5B does not require the translucence processing between theimage of the edge line and the image of the object, unlike the techniqueof controlling the translucency of the edge line shown in FIGS. 6 to 7B.Thus, the first-mentioned technique is advantageous in that it is notrequired to manage the order of drawing in the edge line or to performthe Z-sort process between the object in question and another object.

[0163] On the other hand, the technique of controlling the color of theedge line in FIGS. 4 to 5B raises the following problem.

[0164] If the color of the object OB is monotone (e.g., only red), noproblem occurs. However, the color of the object OB is rarely monotone,and the object OB on which the texture has been mapped is generally twoor more colors.

[0165] In such a case, the technique of controlling the color of theedge line to make the thickness of the edge line EDL inconspicuous maynot provide a remarkable advantage.

[0166] In the case of FIG. 9A, the thickness of the edge line will notbe conspicuous if the color of the edge line EDL is changed, forexample, to thin red as the distance between the object and theviewpoint increases and even though the size of the object OBsignificantly decreases.

[0167] In the case of FIG. 9B, the thickness of the edge line EDL willbe inconspicuous at its part D1 if the color of the edge line EDL ischanged to the thinner red as the distance between the object and theviewpoint increases. However, the thickness of the edge line EDL will beleft conspicuous since the difference between the blue and red colors isconspicuous at another part D2 of the edge line.

[0168] On the contrary, the technique of controlling the translucency ofthe edge line shown in FIGS. 6 to 7B can make the thickness of the edgeline EDL inconspicuous as the distance is between the object and theviewpoint increases and even if the object OB is colored with two ormore colors as shown in FIG. 9B. In other words, the color of the edgeline at the part D1 gradually becomes the red color that is inherent inthe part D1 while the color of the edge line at the part D2 graduallybecomes the red color that is inherent in the part D2.

[0169] When the object OB is colored by two or more colors, thetechnique of controlling the translucency of the edge line isadvantageous over the technique of controlling the color of the edgeline.

[0170] However, the technique of controlling the translucency of theedge line is disadvantageous in that it requires a process ofcontrolling the order of drawing in the edge line.

[0171] Particularly, if the edge line EDL is to be drawn in the outsidearea of the edge line EDL of the object OB as shown in FIG. 10A, theZ-sorting process is required between the edge line EDL and anotherobject OB2 (or background).

[0172] If the Z-sorting process (or hidden-surface removal) is notproperly performed in such a case, a problem will be raised in that theedge line EDL is hidden by the object OB2, as shown in FIG. 11A.

[0173] Even if the Z-sorting process is properly performed, the parts ofthe edge line EDL shown by E1 and E2 in FIG. 11B will be different incolor from each other. This will provide an unnatural image.

[0174] The technique of controlling the translucency of the edge line isnot suitable for the case where the edge line EDL is to be drawn in theoutside area of the edge ED as shown in FIG. 10A, but optimum for thecase where the edge line EDL is to be drawn in the inside area as shownin FIG. 10B. If the edge line is to be drawn in the inside area of theedge, such problems as shown in FIGS. 11A and 11B will not occur only bydrawing the object first and then drawing the edge line. This is becausethe object and edge line will properly be translucent-synthesized.

[0175] Reversely speaking, the technique of controlling the color of theedge line described in connection with FIGS. 4 to 5B is advantageous ifthe edge line EDL is to be drawn in the outside area of the edge ED ofthe object OB. The technique of controlling the color of the edge linehas such problems as described in connection with FIGS. 9A and 9B, butis advantageous in that it does not require to consider the order ofdrawing in the edge line and thus less possible to create such problemsas shown in FIGS. 11A and 11B.

[0176] 2.6 Drawing of the Edge Line Using the Bi-Linear Filtering TypeTexture Mapping

[0177] This embodiment draws the edge line effectively using thebi-linear filtering (in a broad sense, texel interpolation) type texturemapping.

[0178] The texture mapping may create a positional difference betweenthe pixel and texel.

[0179] In such a case, the color CP (which is, in a broad sense, imageinformation) of a pixel (or sampling point) P in the point samplingmethod is equal to the color CA of a texel TA which is nearest to thepixel P. on the other hand, the color CP of the pixel P in the bi-linearfiltering method is equal to a color obtained by interpolating thecolors CA, CB, CC and CD of texels TA, TB, TC and TD which surround thepixel P.

[0180] More particularly, a coordinate ratio in the X-axis direction.β:1−β(0≦β≦1), and a coordinate ratio in the Y-axis direction,γ:1−γ(0≦γ≦1), are determined based on the coordinates of TA to TD and P.

[0181] In this case, the color CP of the pixel P (output color in thebi-linear filtering method) will be represented by the followingformula:

CP=(1−β)×(1−γ)×CA+β×(1−γ)×CB+(1−β)×γ×CC+β×γ×CD  (1)

[0182] This embodiment draws the edge line utilizing the bi-linearfiltering method in which the color is automatically interpolated.

[0183] More particularly, as shown in FIG. 13A, a mapping image isgenerated in which an object color is set in the inside area of the edgeED of the object OB while an edge line color is set in the outside areaof the edge ED. This mapping image is set as a texture, as shown by Flin FIG. 14. This texture is mapped on a virtual polygon (which is, in abroad sense, a virtual object) in the bi-linear filtering method, asshown by F2 in FIG. 14. At this time, texture coordinates given to thevertexes of the virtual polygon are shifted (or deviated or moved), forexample, by (0.5, 0.5), in the lower-right direction.

[0184] Thus, the color of each of the pixels in the mapping image willautomatically infiltrates into the surrounding pixels through theinterpolation in the bi-linear filtering method. Therefore, the objectcolor will be mixed with the edge line color in the vicinity of the edgeof the object OB to draw the edge line EDL along the edge of the objectOB, as shown in FIG. 13B.

[0185] According to the technique of this embodiment, the image of theedge line can be generated through the two-dimensional processing on thedrawing region. Therefore, this embodiment does not require anythree-dimensional processing such as a process of determining an angleincluded between the sight-line vector and the normal line. This canreduce the processing load on CPU.

[0186] According to the technique of this embodiment, the drawingprocedure onto the drawing region only requires at least one drawingprocess for the virtual polygon. This reduces the number of drawingprocesses necessary to generate the image of the edge line, therebysignificantly reducing the processing load on the drawing processor.

[0187] It is now assumed that the vertexes VVX1, VVX2, VVX3 and VVX4 ofa virtual polygon respectively have coordinates, (X, Y)=(X0, Y0), (X0,Y1), (X1, Y1) and (X1, Y0), respectively. If texture coordinates (U, V)given to the respective vertexes VVX1, VVX2, VVX3 and VVX4 of thevirtual polygon are respectively set to (X0, Y0), (X0, Y1), (X1, Y1) and(X1, Y0), the position of each of the pixels will coincide with theposition of the corresponding texel. Therefore, the color of each pixelwill not infiltrate into the surrounding pixels.

[0188] On the contrary, if the texture coordinates (U, V) given to therespective vertexes VVX1, VVX2, VVX3 and VVX4 of the virtual polygon arerespectively set to (X0+0.5. Y0+0.5). (X0+0.5, Y1+0.5), (X1+0.5, Y1+0.5)and (X1+0.5, Y0 +0.5), the position of each pixel will be deviated fromthe position of the corresponding texel. Therefore, the color of eachpixel will infiltrate into the surrounding pixels through the bi-linearfiltering type interpolation.

[0189] More particularly, if the bi-linear filtering type texturemapping is carried out after the texture coordinates are shifted by 0.5pixels (texels) in the lower-right direction, β=γ=½ in the above formula(1), If the colors of the texels T44, T45, T54 and T55 are respectivelyC44, C45, C54 and C55 in FIG. 15, therefore, the color CP44 of the pixelP44 is represented by the following formula:

CP 44=(C 44+C 45+C 54+C 55)/4  (2)

[0190] If the bi-linear filtering type texture mapping is carried outwhile shifting the texture coordinates in the lower-right direction, thecolor C44 of the texel T44, that is, the original color of the pixel P44will infiltrate into the pixels P33, P34, P43 and P44 by ¼, as shown inFIG. 15. Thus, such an image of the edge line EDL as shown in FIG. 13Bcan be generated to include the mixture of the edge line and objectcolors.

[0191] 2.7 Generation of the Virtual Polygon

[0192] The virtual polygon to be mapped with the mapping image in FIG.14 may take any of various forms.

[0193] If the virtual polygon is one having its size equal to the screensize, the bi-linear filtering type interpolation will be applied to thewhole screen.

[0194] However, it has been found that when the virtual polygon havingthe screen size is used, a problem was raised in that the edge linecannot effectively be drawn.

[0195] In the three-dimensional game, the player's viewpoint is moved toan arbitrary position depending on the operational input from theplayer. The object representing the character or the like is also movedto an arbitrary position. Thus, the distance between the player'sviewpoint and the object also varies. The size of the perspectivelytransformed object (or the screen area occupied by the object) will alsovary depending on the distance between the viewpoint and the object.

[0196] If the distance between the viewpoint and the object OB is neareras shown in FIG. 16A, the size of the perspectively transformed objectOB increases (or the screen area occupied by the object increases).

[0197] On the other hand, if the distance between the viewpoint and theobject OB is farther as shown in FIG. 16B, the size of the perspectivelytransformed object OB decreases (or the screen area occupied by theobject decreases).

[0198] If the screen area occupied by the object OB is larger as shownin FIG. 16A, the processing will not be inefficient even though thevirtual polygon to be mapped with the mapping image has its size equalto the screen size.

[0199] If the screen area occupied by the object OB is smaller as shownin FIG. 16B, however, a useless drawing process will be carried out whenthe polygon of the screen size is used. This unnecessarily increases theprocessing load.

[0200] To avoid such a problem, this embodiment generates a virtualpolygon VPL of FIGS. 16A and 16B which encloses the image of theperspectively transformed object OB and which has its size variabledepending on the size of the perspectively transformed object OB. Themapping image (see FIG. 13A) is then mapped on this virtual polygon VPL.

[0201] If the distance between the viewpoint and the object OB varies tochange the screen area occupied by the object OB, the size of thevirtual polygon VPL correspondingly varies. For example, as the distancebetween the viewpoint and the object OB increases, the size of thevirtual polygon VPL decreases. Thus, the drawing process can effectivelybe carried out to optimize the load on the drawing process.

[0202] If the object is configured by object parts, a virtual polygonmay be generated for each of the object parts. If part of the object(e.g., eye or mouth) is only to be processed, such a virtual polygon asenclosing part of the perspectively transformed object may be generated.

[0203] The technique of generating the virtual polygon may take any ofvarious techniques.

[0204] The first technique generates the virtual polygon VPL based onthe coordinates of the vertexes VX1 to VX6 (which are, in a broad sense,definition points including the control points of free-form surfaces) inthe perspectively transformed object, as shown in FIGS. 17A and 17B.

[0205] More particularly, the virtual polygon VPL will be generated bydetermining the vertexes VVX1 (XMIN, YMIN), VVX2 (XMIN, YMAX), VVX3(XMAX, YMAX) and VVX4 (XMAX. YMIN) of the virtual polygon VPL, based onthe minimum values XMIN, YMIN and maximum values XMAX, YMAX of the X-and Y-coordinates in the vertexes of the object OB.

[0206] Since the first technique can optimally reduce the size of thevirtual polygon VPL depending on the size of the perspectivelytransformed object OB, it is advantageous in that the load on drawingthe virtual polygon VPL is reduced. On the other hand, it isdisadvantageous in that if the vertexes in the object OB is much more,the load on determining the minimum and maximum X- and Y-coordinates inthe respective vertexes increases.

[0207] The second technique uses a simplified object SOB (bounding boxor bounding volume) which encloses the object OB. as shown in FIG. 18A.This simplified object SOB is used to perform hit checking or the likefor the object OB. This embodiment effectively uses this simplifiedobject SOB to generate the virtual polygon VPL based on the coordinatesof the vertexes (which are, in a broad sense, definition points) in aperspectively transformed simplified object SOB.

[0208] More particularly, the virtual polygon VPL is generated bydetermining the vertexes VVX1 to VVX4 of the virtual polygon VPL basedon the minimum and maximum X- and Y-coordinates of the vertexes VSX1 toVSX8 in the perspectively transformed simplified object SOB, as shown inFIG. 18B.

[0209] The second technique has an advantage in that since it uses thesimplified object SOB having its vertexes less than those of the objectOB, the minimum and maximum X- and Y-coordinates of the vertexes can bedetermined with reduced load. On the other hand, the second techniquemust generate the virtual polygon VPL having its size larger than thatof the first technique. The second technique is thus disadvantageous inthat the load on drawing the virtual polygon VPL increases in comparisonwith the first technique.

[0210] The size of the virtual polygon VPL may be slightly larger in theup/down and right/left directions than that of the virtual polygon VPLshown in FIGS. 17A, 17B and 18B (e.g., by one pixel). Particularly, ifthe edge line is to be drawn in the outside area of the edge of theobject, the technique of scaling the size of the virtual polygon in sucha manner is effective.

[0211] The technique of changing the size of the virtual polygon VPLdepending on the size of the perspectively transformed object is notlimited to the aforementioned first and second techniques. For example,the size of the virtual polygon VPL may suitably be changed depending onthe distance between the viewpoint and the object.

[0212] If the translucency of the edge line is to be changed dependingon the size of the perspectively transformed object as described inconnection with FIGS. 4, 5B, 6 and 7B, the translucency of the edge linemay be changed by determining and using the size (or number of pixels)of the virtual polygon (virtual object) which is generated through thetechnique described in connection with FIGS. 16A to 18B.

[0213] 2.8 Image of Edge Line

[0214] The technique of generating the image of the edge line of theobject will be described below.

[0215] This embodiment generates the image of the edge line using thebi-linear filtering type texture mapping processing described in theabove item 2.6.

[0216] 2.8.1 Generation of Mapping Image

[0217] More particularly, the pre-procedure first initializes a workbuffer (effect buffer) with the image information (RL, GL, BL, αL) ofthe edge line. Namely, the color of each pixel is set to the color ofthe edge line (RL, GL, BL) while the alpha value is set at αL (=0).

[0218] Next, an object OB to which the edge line is to be added is drawnin the work buffer. At this time, the alpha value in each of thevertexes of the object OB has been set at αJ (>0). For simplicity, it isassumed herein that the color of the object OB is a single color (RJ,GJ, BJ).

[0219] In such a situation, such an image as shown in FIG. 19 (mappingimage) will be drawn in the work buffer.

[0220] In other words, the inside area of the edge ED of the object OBis set to the color of the same object OB while the outside area of theedge ED is set to the color of the edge line (RL, GL, BL). The alphavalue in the inside area is set at αJ (>0) while the alpha value in theoutside area is set at αL (=0).

[0221] The setting of alpha value shown in FIG. 19 is shown only forillustration, but it is essential that the alpha value in the outsidearea is necessarily different from that of the inside area.

[0222] 2.8.2 Bi-linear Filtering Type Texture Mapping

[0223] The mapping image on the work buffer shown in FIG. 19 is thendrawn on a frame buffer at the same position.

[0224] More particularly, a virtual polygon (which is, in a broad sense,a virtual object) is drawn in the frame buffer while mapping the mappingimage on the work buffer onto the virtual polygon, as shown in FIG. 20.

[0225] In this case, there is generated a virtual polygon (effectregion) which encloses the object and which has its size variabledepending on the size of the perspectively transformed object. Themapping image on the work buffer is mapped onto this virtual polygon.

[0226] On performing this texture mapping:

[0227] (1) The hi-linear filter (texel interpolation) is selected;

[0228] (2) The texture coordinates are shifted (or deviated), forexample, by +0.5 pixels (texels), as described in connection with FIG.14; and

[0229] (3) In the source alpha (α) test (or alpha test for the mappingimage which is a writing source), only a pixel having α>0 (a pixel, α ofwhich is not equal to zero) is passed.

[0230] Thus, such an image as shown in FIG. 21 is generated in which theedge line EDL is added to the object OB.

[0231] By selecting the bi-linear filter and shifting the texturecoordinates, the interpolation will be carried out for the color andalpha value (A-value) which are set to each of the pixels in the mappingimage on the work buffer.

[0232] If it is now assumed that the texture coordinates (U, V) isshifted by +0.5 pixels (texels) and when the position of the drawn pixelis at (X, Y), the colors and alpha values at the positions of tourpixels (X, Y), (X+1, Y), (X, Y+1) and (X+1, Y+1) will be referred to ontexture sampling. As a result. the color and alpha value of the finallydrawn texel will be equal to the respective averages of the colors andalpha values of the above four pixels. For example, if the texturecoordinates are shifted in the lower-right direction as shown in FIG.22, the RGBs and alpha values of the pixels B, C and D will infiltrateinto a pixel A by ¼. This may be represented by the following formula:$\begin{matrix}\begin{matrix}{{R = {\left( {{RA} + {RB} + {RC} + {RD}} \right)/4}},} \\{{G = {\left( {{GA} + {GB} + {GC} + {GD}} \right)/4}},} \\{{B = {\left( {{BA} + {BB} + {BC} + {BD}} \right)/4}},{and}} \\{\alpha = {\left( {{\alpha \quad A} + {\alpha \quad B} + {\alpha \quad C} + {\alpha \quad D}} \right)/4}}\end{matrix} & (3)\end{matrix}$

[0233] In the above formula, R. G, B and a are respectively the colorsand alpha value obtained through the interpolation (or the colors andalpha value of the interpolated pixel A). Furthermore, (RA, GA, BA, αA),(RB, GB, BB, αB), (RC, GC, BC, αC) and (RD, GD, BD, αD) are the colorsand alpha values of the pixels A, B, C and D before interpolated,respectively.

[0234] As will be apparent from the foregoing, the RGBs and alpha valuesof the pixels B, C and D will infiltrate into the pixel A by ¼ byshifting the texture coordinates by 0.5 pixels in the lower-rightdirection. As a result, at a portion shown by Hl in FIG. 21, the colorof the object OB (RJ, GJ, BJ) will be blended with the color of the edgeline (RL, GL, BL) in the inside area of the edge ED to generate theimage of the edge line EDL in the inside area of the edge ED, as shownin FIG. 23A.

[0235] The color of this edge line (RL, CL, BL,) is the color set to theoutside area of the edge ED in the work buffer as shown in FIG. 19.

[0236] On the other hand, at another portion shown by H2 in FIG. 21, thecolor of the object OB (RJ, GJ, BJ) will be blended with the color ofthe edge line (RL, GL, BL) in the outside area of the edge ED togenerate the image of the edge line EDL in the outside area of the edgeED, as shown in FIG. 23B, In such a manner, the edge line EDL will bedrawn along the edge ED of the object OB, as shown in FIG. 21.

[0237] In this embodiment, the alpha value will also be subjected to thebi-linear filtering type interpolation in addition to the Color. Thealpha value set to the edge line EDL will thus be obtained by blendingαJ of the object OB with αL in the edge line.

[0238] The above procedure will further be described in detail.

[0239] (I) Pixel Surrounded by Pixels to be Referred to, All of Whichare Colored with the Edge Line Color

[0240] In pixels as shown by I1 and I2 in FIGS. 23A and 23B, all theRGBs and alpha values of the surrounding pixels to be referred to are(RL, GL, BL, αL). In the aforementioned formula (3), therefore, (RA, GA,BA, αA)=(RB, GB, BB, αB)=(RC, GC, BC, αC)=(RD, GD, BD, αD)=(RL, GL, BL,αL). Thus, the RGB and alpha value after interpolated becomes (R, G, B,α)=(RL, GL, BL, αL).

[0241] Since α=αL=0 at this time (see FIG. 19), the source alpha (α)test does not pass such pixels. Therefore, these pixels are inhibited tobe drawn.

[0242] (II) Pixel to be Referred to in Respect with the Pixels of Boththe Edge Line and Object Colors

[0243] Pixels as shown by I3 and I4 in FIGS. 23A and 23B are surroundedby pixels (texels) of (RL, GL, BL, αL) and pixels (texels) of (RJ, GJ,BJ, αJ). In such a case, if it is assumed that the number of pixels of(RJ, GJ, BJ, αJ) is K, (R, G, B, α) after interpolation through theabove formula (3) are represented by the following formula:$\begin{matrix}\begin{matrix}{{R = {\left\{ {{{RJ} \times K} + {{RL} \times \left( {4 - K} \right)}} \right\}/4}},} \\{{G = {\left\{ {{{GJ} \times K} + {{GL} \times \left( {4 - K} \right)}} \right\}/4}},} \\{{B = {\left\{ {{{BJ} \times K} + {{BL} \times \left( {4 - K} \right)}} \right\}/4}},{and}} \\{\alpha = {\left\{ {{\alpha \quad J \times K} + {\alpha \quad L \times \left( {4 - K} \right)}} \right\}/4}}\end{matrix} & (4)\end{matrix}$

[0244] As will be apparent, the color of the interpolated pixel will becolored with a color obtained by mixing the color (RJ, GJ, BJ, αJ) ofthe object OB with the color (RL, GL, BL, αL) of the edge line.

[0245] Since αJ>0.1≦K≦3 and αL=0, 0<α<αJ. Therefore, the source alphatest passes these pixels which will in turn be necessarily drawn.

[0246] (III) Pixel Surrounded by Pixels to be Referred to, All of Whichare Colored with the Object Color

[0247] In pixels as shown by I5 and I6 in FIGS. 23A and 23B, all theRGBs and alpha values of the surrounding pixels to be referred to are(RJ, GJ, BJ, αJ). In the aforementioned formula (3), therefore, (RA, CA,BA, αA)=(RB, GB, BB, αB)=(RC, GC, BC, αC)=(RD, GD, BD, αD)=(RJ, GJ, BJ,αJ). Thus, the RGB and alpha value after interpolated becomes (R, G, B,α)=(RJ, GJ, BJ, αJ).

[0248] Since α=αJ>0 at this time (see FIG. 19), the source alpha testpasses such pixels. Therefore, these pixels are drawn to be colored withthe object color.

[0249] In such a manner, such an image as shown in FIG. 21 can be drawnin the frame buffer.

[0250] In FIG. 21, the edge line EDL is also drawn in the outside areaof the edge ED of the object OB. In this case, it is therefore desirableto take the technique of controlling the color of the edge linedepending on the distance between the object and the viewpoint or thesize of the perspectively transformed object, as shown in FIGS. 4 to 5Bdescribed above.

[0251] However, the technique of FIG. 21 will apply the bi-linearfiltering type interpolation not only to the portion around the edge EDof the object OB, but also the whole object OB. Thus, the defocusedimage of the whole object OB will be generated. To overcome such aproblem, this embodiment takes the following technique.

[0252] 2.8.3 Drawing the Object into the Frame Buffer

[0253] As in the above item 2.8.2, the mapping image in the work buffershown in FIG. 19 is drawn in the frame buffer at the same position. Moreparticularly, a virtual polygon is drawn in the frame buffer whilemapping the mapping image on the work buffer onto the virtual polygon.

[0254] In this case, as described in connection with FIGS. 16A to 18B,the virtual polygon (effect region) is generated so that it encloses theobject and that it has its size variable depending on the size of theperspectively transformed object.

[0255] The source alpha test is carried out with the destination alphatest so that the image of the edge line EDL drawn in FIG. 21 will not beerased by any overwriting.

[0256] Namely, as shown in FIG. 24,

[0257] (1) The texture coordinates are not shifted;

[0258] (2) The source alpha test (or alpha test for the mapping imagewhich is a writing source) passes only a pixel having α>0; and

[0259] (3) The destination alpha test (or alpha test for the mappingimage which is a written destination) passes only a pixel having α=αJ.

[0260] Under the above condition (1), the mapping image on the workbuffer is drawn in the frame buffer without being interpolated.

[0261] Under the above condition (2), any pixel set to the edge linecolor among the pixels in the mapping image (image in the work buffer)is inhibited to be drawn.

[0262] Under the above condition (3), any overwriting is inhibitedrelative to the pixel region of 0<α<αJ in which the image of the edgeline has been drawn in FIG. 21. In other words, the focused image of theobject OD on the work buffer is drawn on only a region left by removingthe region of the edge line EDL (more particularly, right and bottomedge line portions) of the object OB from the inside area of the edge EDof the object OB. Thus, the problem relating to the defocused image ofthe whole object OB can be overcome.

[0263] One of the features of this embodiment is to use different alphavalues in the inside and outside areas of the edge ED of the object OB(FIG. 19) and to interpolate not only the color, but also the alphavalue, the interpolated alpha value being then used to perform variousdeterminations. More particularly, the interpolated alpha value is usedto discriminate the region (0<α<αJ) of the edge line EDL of the objectOB or to discriminate the other region left by removing the region ofthe edge line EDL from the inside area of the edge ED. Thus, the edgeline EDL of the object OB can be generated with reduced processing load.

[0264] 2.9 Drawing the Edge Line into the Inside Area

[0265] The technique of drawing the edge line in the inside area of theedge of the object.

[0266] 2.9.1 Generation of the Mapping Image

[0267] Such a mapping image as shown in FIG. 19 is first generated inthe same technique as in the aforementioned item 2.8.1.

[0268] 2.9.2 Generation of Alpha (Mask) Plane

[0269] Next, only the alpha (mask) plane in the mapping image on thework buffer shown in FIG. 19 is drawn in the frame buffer.

[0270] More particularly, the virtual polygon is drawn in the framebuffer while mapping the mapping image on the work buffer onto thevirtual polygon to draw only the alpha (α) plane of the mapping imageinto the frame buffer, Thus, the alpha (mask) plane which is set atα=αJ(>0) in the inside area of the edge ED of the object OB and at α=αL(=0) in the outside area will be generated on the frame buffer, as shownin FIG. 25.

[0271] 2.9.3 Drawing the Image of the Object

[0272] Next, the image of the object OB is drawn in the frame buffer.When the image of the object OB has previously been drawn in the framebuffer, the image of the object can be translucent-synthesized (or alphablended) with the image of the edge line.

[0273] More particularly, the virtual polygon is drawn in the framebuffer while mapping the mapping image on the work buffer onto thevirtual polygon.

[0274] On this texture mapping,

[0275] (1) The alpha plane drawn in FIG. 25 is masked for not destroyingit, and

[0276] (2) The source alpha test passes only a pixel having α=αJ.

[0277] As shown in FIG. 26, thus, the frame buffer will include theimage of the object OB (original image) and the alpha plane generated inFIG. 25.

[0278] 2.9.4 Bi-Linear Filtering Type Texture Mapping

[0279] Next, the mapping image on the work buffer shown in FIG. 19 isdrawn in the frame buffer at the same position.

[0280] More particularly, the virtual polygon is drawn in the framebuffer while mapping the mapping image on the work buffer onto thevirtual polygon, as shown in FIG. 27.

[0281] On performing this texture mapping:

[0282] (1) The bi-linear filter (texel interpolation) is selected;

[0283] (2) The texture coordinates are shifted (or deviated), forexample, by +0.5 pixels (texels), as described in connection with FIG.14;

[0284] (3) In the source alpha test, only a pixel having α<αJ is passed;and

[0285] (4) In the destination alpha test, only a pixel having α=αJ ispassed.

[0286] Thus, such an image as shown in FIG. 28 is generated in which theedge line EDL is added to the right and bottom edges in the inside areaof the object OB.

[0287] In other words, at a portion shown by J1 in FIG. 28, the color ofthe object OB (RJ, GJ, BJ) is blended with the color of the edge line(RL, GL, BL) in the inside area of the edge ED. thus, the image of theedge line EDL will be generated in the inside area of the edge ED.

[0288] In addition to the color, this embodiment also processes thealpha value set to the edge line EDL through the bi-linear filteringtype interpolation. Therefore, the alpha value set to the edge line EDLis also one obtained by blending αJ of the object OB with αL of the edgeline.

[0289] This procedure will further be described in detail. (I) Pixelsurrounded by pixels to be referred to, all of which are colored withthe edge line color In such a pixel as shown by K1 in FIG. 29, the RGBsand alpha values after interpolated are (R, G, B, α)=(RL, GL, BL, αL).

[0290] Since α=αL=0 in set at this time (see FIG. 19), the source alphatest that passes pixels of α<αJ is passed. However, the destinationalpha test passing only the pixels of α=αJ does not pass any pixel in aregion other than the area in which the image of the object OB has beendrawn. As a result, such an pixel as shown by K1 in FIG. 29 is inhibitedto be drawn.

[0291] (II) In a Pixel to be Referred to in Respect with the Pixels ofBoth the Edge Line and Object Colors.

[0292] In such a pixel as shown by K2 in FIG. 29, the interpolated (R,G, Band a) are similar to those of the formula (4) described inconnection with the above item 2.8.2. In other words, the color of theinterpolated pixel is one obtained by mixing the color of the object OB(RJ, GJ, BLJ, αJ) with the color of the edge line=(RL, GL, BL, αL).

[0293] Since αJ>0, 1≦K≦3 and αL=0, 0<α<αJ. Therefore, the source alphatest that passes pixels of α<αJ is passed, which will in turn be drawnin the frame buffer.

[0294] By the destination alpha test for passing only the pixel of α=αJ,only the portions of the edge line image within the inside area of theobject (or the right and bottom edges of the edge line in FIG. 28) willbe drawn in the frame buffer.

[0295] (III) Pixel Surrounded by Pixels to be Referred to are Coloredwith the Object Color

[0296] In such a pixel as shown by K3 in FIG. 29, the interpolated RGBsand alpha values are (R, G, B, α)=(RJ, GJ, BJ, αJ).

[0297] Since α=αJ is set at this time (see FIG. 19), the source alphatest that passes a pixel of α<αJ is not passed. Therefore, these pixelsare inhibited to be drawn.

[0298] In such a manner, such an image as shown in FIG. 28 can be drawnin the frame buffer.

[0299] 2.9.5 Drawing the Left and Top Edges of the Edge Line

[0300] Next, the mapping image on the work buffer shown in FIG. 19 ismapped on the virtual object while shifting the texture coordinates in adirection opposite to that of the aforementioned item 2.9.4. The virtualobject is then drawn in the frame buffer.

[0301] More particularly, as shown in FIG. 30,

[0302] (1) The bi-linear filtering method is selected;

[0303] (2) The texture coordinates (U, V) are shifted (or deviated) by(−0.5, −0.5) reversely as in the aforementioned item 2.9.4;

[0304] (3) The source alpha test passes only a pixel of α<αJ; and

[0305] (4) The destination alpha test passes only a pixel of α=αJ.

[0306] Thus, the edge line EDL is also added to the left and top edgesin the inside area of the object OB. Thus, the image including the edgeline EDL drawn in the inside area of the edge ED of the object OB willbe drawn.

[0307] 3. Procedure of This Embodiment

[0308] The details of a procedure according to this embodiment will bedescribed in connection with flowcharts shown in FIGS. 32 to 39.

[0309]FIG. 32 shows a flowchart illustrating the process of generating avirtual polygon onto which a mapping image is to be mapped.

[0310] First of all, the geometry-processing is carried out relative toan object to perspective-transform (or affine-transformed) it into thescreen (step S1.

[0311] Next, the minimum and maximum values XMN. YMIN and XMAX, YMAX inthe X- and Y-coordinates of the object vertexes are determined based onthe vertex coordinates of the perspectively transformed object (stepS2).

[0312] Next, based on the determined (XMIN, YMIN) and (XMAX, YMAX), avirtual polygon enclosing the image of the object OB is generated asdescribed in connection with FIGS. 17A and 17B (step S3). At this time,the vertexes VVX1 to VVX4 of the virtual polygon are as follows:

[0313] VVX1 (XMIN, YMIN),

[0314] VVX2 (XMIN, YMAX),

[0315] VVX3 (XMAX, YMAX), and

[0316] VVX4 (XMAX, YMIN).

[0317] The size of the virtual polygon (image effect region) mayslightly be enlarged in the up/down and right/left directions. Moreparticularly, if it is assumed that the minimum values of the X- andY-coordinates are XMIN, YMIN and that the maximum values thereof areXMAX, YMAX, each of the minimum values XMIN, YMIN is subtracted by onepixel to determine XMIN′=XMIN−1, YMIN′=YMIN−1. At the same time, each ofthe maximum values XMAX, YMAX is added by one pixel to determineXMAX′=XMAX+1, YMAX′=YMAX+1. These determined minimum and maximum values(XMIN′, YMIN′) and (XMAX′, YMAX′) are used to determine the vertexesVVX1 to VVX4 of the virtual polygon.

[0318]FIG. 33 shows a flowchart illustrating the process of generatingthe virtual polygon using the simplified object of the object asdescribed in connection with FIGS. 18A and 18B.

[0319]FIG. 33 is different from FIG. 32 in that theperspective-transformation is performed relative to the simplifiedobject at step S11 and that the values (XMIN, YMIN) and (XMAX, YMAX) aredetermined based on the coordinates of the vertexes in the perspectivelytransformed simplified object at step S12. The other steps are similarto those of FIG. 32.

[0320]FIG. 34 shows a flowchart illustrating the process of adding theedge line to the object.

[0321] First of all, the work buffer is initialized with the image ofthe edge line (RL, GL, BL, αL) as described in connection with FIG. 19(step S21).

[0322] Next, the object having its vertex alpha value set to α=αJ(>0) issubjected to the perspective-transformation and drawn in the work buffer(step S22). At this time, the hidden-surface removal will be performedusing the Z-buffer for the work buffer.

[0323] Next, the virtual polygon is drawn in the frame buffer whilemapping the mapping image on the work buffer onto the virtual polygon inthe bi-linear filtering method while shifting the texture coordinates(step S23). At this time, α>0 is specified as the source alpha test. Apseudo-Z-value obtained from the information of the object (e.g. vertexcoordinates, representative point coordinates and the like) has been seton the virtual polygon and the hidden-surface removal is preformed usingthe normal Z buffer.

[0324] Next, the virtual polygon is drawn in the frame buffer whilemapping the mapping image on the work buffer onto the virtual polygon(step S24). At this time. α>0 is specified as the source alpha testwhile α=αJ is specified as the destination alpha test. A pseudo-Z-valueobtained from the information of the object has been set on the virtualpolygon and the hidden-surface removal is preformed using the normal Zbuffer.

[0325] Thus, the image of the object added by the edge line (or imagehaving its emphasized edge line) can be provided.

[0326]FIG. 35 shows a flowchart illustrating the process of adding theedge line to the inside area of the object.

[0327] First of all, the work buffer is initialized with the image ofthe edge line (RL, GL, BL, αL) as described in connection with FIG. 19(step S31).

[0328] Next, the object having its vertex alpha value set to α=αJ (>0)is subjected to the perspective-transformation and drawn in the workbuffer (step S32). At this time, the hidden-surface removal will beperformed by the Z-test using the normal Z-buffer. Thus, the Z-value ofthe object in the position in which the edge line is drawn can be set asthe Z-value of the edge line.

[0329] Next, as described in connection with FIG. 25, the mapping imageon the work buffer is mapped onto the virtual polygon and only the alphavalue is drawn in the frame buffer (step S33).

[0330] Next, as described in connection with FIG. 26, the mapping imageon the work buffer is mapped onto the virtual polygon and only the pixelof α=αJ is drawn in the frame buffer (step S34). Thus, the originalimage of the object can be drawn in the frame buffer.

[0331] Next, as described in connection with FIG. 27, the virtualpolygon is drawn in the frame buffer while mapping the mapping image onthe work buffer onto the virtual polygon through the bi-linear filteringmethod while shifting the texture coordinates (U, V) by (0.5, 0.5) (stepS35). At this time, α<αJ is specified as the source alpha test whileα=αJ is specified as the destination alpha test. Furthermore, the imageof the object is translucent-synthesized with the image of the edge lineusing the translucency αT which has been set at a given register.

[0332] Next, as described in connection with FIG. 30, the virtualpolygon is drawn in the frame buffer while mapping the mapping image onthe work buffer onto the virtual polygon through the bi-linear filteringmethod while shifting the texture coordinates (U, V) by (−0.5, −0.5)(step S36). At this time, α<αJ is specified as the source alpha testwhile α=αJ is specified as the destination alpha test. Furthermore, theimage of the object is translucent-synthesized with the image of theedge line using the translucency αT which has been set at a givenregister.

[0333] The steps S33 to S36 in FIG. 35 will not perform the Z-test.

[0334] In such a manner, there can be provided such an image as shown inFIG. 31 in which the edge line is drawn in the inside area of theobject.

[0335]FIG. 36 shows a flowchart illustrating the process of changing thecolor of the edge line depending on the distance (z-value). The Z-valueincreases as it approaches the viewpoint.

[0336] First of all, the threshold values ZN, ZF of the Z-value (whichcorrespond to VTN, VTF in FIG. 5A) as well as the colors CN, CF of thosethreshold values have previously been set (step S41).

[0337] Next, the representative Z-value of the object, the edge line ofwhich is to be drawn (Z-value at the representative point) is determined(step S42).

[0338] Next, the determined representative Z-value is used to determinea coefficient V for determining the color as shown by the followingformula (step S43).

V=(Z−ZF)/(ZN−ZF)

[0339] In the above formula, however, V=1.0 when V>1.0. V=0.0 whenV<0.0.

[0340] Next, the determined coefficient V is used to determine the colorC of the edge line as shown by the following formula (step S44).

C=(CN−CF)×V+CF

[0341] Next, the determined color C is used to drawn the edge line (stepS45).

[0342]FIG. 37 shows a flowchart illustrating the process of changing thecolor of the edge line depending on the size of the object (number ofpixels).

[0343] First of all, the threshold values PN, PF in the size of theobject, the edge-line of which is to be drawn (which correspond to VTN,VTF in FIG. 5B) as well as the colors CN, CF corresponding to thesethreshold values have previously been set (step S51).

[0344] Next, the number of pixels P (the number of longitudinalpixels×the number of transverse pixels) of the object (intwo-dimensional image), the edge line of which is to be drawn on thescreen, is determined (step S52).

[0345] Next, the determined number of pixels P is used to determine thecoefficient V for determining the color as shown by the followingformula (step S53).

V=(P−PF)/(PN−PF)

[0346] In the above formula, however, V=1.0 when V>1.0. V=0.0 whenV<0.0.

[0347] Next, the determined coefficient V is used to determine the colorC of the edge line (step S54). The determined color C is then used todrawn the edge line (step S55).

[0348]FIG. 38 shows a flowchart illustrating the process of changing thetranslucency of the edge line depending on the distance (Z-value). FIG.38 is different from FIG. 36 only in the following points.

[0349] In place of the colors CN, CF, the translucencies αTN, αTF havebeen set at step S61.

[0350] At step S64, the coefficient V is used to determine thetranslucency αT of the edge line as shown by the following formula.

αT=(αTN−αTF)×V+αTF

[0351] At step S65, the determined value αT is used to translucent-drawthe edge line.

[0352]FIG. 39 shows a flowchart illustrating the process of changing thetranslucency of the edge line depending on the size of the object(number of pixels). FIG. 39 is different from FIG. 37 only in thefollowing points.

[0353] At step S71, the translucencies αTN, αTF have been set in placeof the colors CN, CF.

[0354] At step S74, the coefficient V is used to determine thetranslucency αT of the edge line as shown by the following formula.

αT=(αTN−αTF)×V+αTF

[0355] At step S75, the determined value αT is used to translucent-drawthe edge line.

[0356] 4. Hardware Configuration

[0357] A hardware arrangement which can realize this embodiment is shownin FIG. 40.

[0358] A main processor 900 operates to execute various processings suchas game processing, image processing, sound processing and otherprocessings according to a program stored in a CD (information storagemedium) 982, a program transferred through a communication interface 990or a program stored in a RON (information storage medium) 950.

[0359] A coprocessor 902 is to assist the processing of the mainprocessor 900 and has a product-sum operator and analog divider whichcan perform high-speed parallel calculation to execute a matrix (orvector) calculation at high speed. If a physical simulation for causingan object to move or act (motion) requires the matrix calculation or thelike, the program running on the main processor 900 instructs (or asks)that processing to the coprocessor 902.

[0360] A geometry processor 904 is to perform a geometry processing suchas coordinate transformation, perspective transformation, light sourcecalculation, curve formation or the like and has a product-sum operatorand analog divider which can perform high-speed parallel calculation toexecute a matrix (or vector) calculation at high speed. For example, forthe coordinate transformation, perspective transformation or lightsource calculation, the program running on the main processor 900instructs that processing to the geometry processor 904.

[0361] A data expanding processor 906 is to perform a decoding processfor expanding image and sound compressed data or a process foraccelerating the decoding process in the main processor 900. In theopening, intermission, ending or game scene, thus, an MPEG compressedanimation image maybe displayed. The image and sound data to be decodedmay be stored in the storage devices including ROM 950 and CD 982 or mayexternally be transferred through the communication interface 990.

[0362] A drawing processor 910 is to draw or render an objectconstructed by primitive surfaces such as polygons or curved faces athigh speed. On drawing the object, the main processor 900 uses a DMAcontroller 970 to deliver the object data to the drawing processor 910and also to transfer a texture to a texture storage section 924, ifnecessary. Thus, the drawing processor 910 draws the object in a framebuffer 922 at high speed while performing a hidden-surface removal bythe use of a Z-buffer or the like, based on the object data and texture.The drawing processor 910 can also perform α-blending (or translucencyprocessing), mip-mapping, fogging, tri-linear filtering, anti-aliasing,shading and so on. As the image for one frame is written into the framebuffer 922, that image is displayed on a display 912.

[0363] A sound processor 930 includes any multi-channel ADPCM soundsource or the like to generate high-quality game sounds such as BGMS,sound effects and voices. The generated game sounds are outputted from aspeaker 932.

[0364] The operational data from a game controller 942, saved data froma memory card 944 and personal data may externally be transferredthrough a serial interface 940.

[0365] ROM 950 has stored a system program and so on. For an arcade gamesystem, the ROM 950 functions as an information storage medium in whichvarious programs have been stored. The ROM 950 may be replaced by anysuitable hard disk.

[0366] RAM 960 is used as a working area for various processors.

[0367] The DMA controller 970 controls the transfer of DMA between theprocessors and memories (such as RAMs, VRAMS, ROMs or the like).

[0368] CD drive 980 drives a CD 982 (information storage medium) inwhich the programs, image data or sound data have been stored andenables these programs and data to be accessed.

[0369] The communication interface 990 is to perform data transferbetween the image generating system and any external instrument througha network. In such a case, the network connectable with thecommunication interface 990 may take any of communication lines (analogphone line or ISDN) or high-speed serial interface bus. The use of thecommunication line enables the data transfer to be performed through theINTERNET. If the high-speed serial interface bus is used, the datatransfer may be carried out between the image generating system and anyother game system.

[0370] All the means of the present invention may be executed onlythrough hardware or only through a program which has been stored in aninformation storage medium or which is distributed through thecommunication interface. Alternatively, they may be executed boththrough the hardware and program.

[0371] If all the means of the present invention are executed boththrough the hardware and program, the information storage medium willhave stored a program (and data) for executing the means of the presentinvention through the hardware. More particularly, the aforementionedprogram instructs the respective processors 902, 904, 906, 910 and 930which are hardware and also delivers the data to them, if necessary.Each of the processors 902, 904, 906, 910 and 930 will execute thecorresponding one of the means of the present invention based on theinstruction and delivered data.

[0372]FIG. 41A shows an arcade game system to which this embodiment isapplied. Players enjoy a game by controlling levers 1102 and buttons1104 while viewing a game scene displayed on a display 1100. A systemboard (circuit board) 1106 included in the game system includes variousprocessor and memories which are mounted thereon. Information (programor data) for executing all the means of the present invention has beenstored in a memory 1108 on the system board 1106, which is aninformation storage medium. Such information will be referred to “storedinformation” later.

[0373]FIG. 41B shows a home game apparatus to which this embodiment isapplied. A player enjoys a game by manipulating game controllers 1202and 1204 while viewing a game picture displayed on a display 1200. Insuch a case, the aforementioned stored information pieces have beenstored in CD 1206 or memory cards 1208, 1209 which are detachableinformation storage media in the game system body.

[0374]FIG. 41C shows an example in which this embodiment is applied to agame system which includes a host device 1300 and terminals 1304-1 to1304-n connected to the host device 1300 through a network (which is asmall-scale network such as LAN or a global network such as INTERNET)1302. In such a case, the above stored information pieces have beenstored in an information storage medium 1306 such as magnetic diskdevice, magnetic tape device, memory or the like which can be controlledby the host device 1300, for example. If each of the terminals 1304-1 to1304-n are designed to generate game images and game sounds in astand-alone manner, the host device 1300 delivers the game program andother data for generating game images and game sounds to the terminals1304-1 to 1304-n. On the other hand, if the game images and soundscannot be generated by the terminals in the stand-alone manner, the hostdevice 1300 will generate the game images and sounds which are in turntransmitted to the terminals 1304-1 to 1304-n.

[0375] In the arrangement of FIG. 41C, the means of the presentinvention may be decentralized into the host device (or server) andterminals. The above information pieces for realizing the respectivemeans of the present invention may be distributed and stored into theinformation storage media of the host device (or server) and terminals.

[0376] Each of the terminals connected to the network may be either ofdomestic or arcade type. When the arcade game systems are connected tothe network, it is desirable that each of the arcade game systemsincludes a portable information storage device (memory card or portablegame machine) which can not only transmit the information between thearcade game systems but also transmit the information between the arcadegame systems and the home game systems.

[0377] The present invention is not limited to the things described inconnection with the above forms, but may be carried out in any ofvarious other forms.

[0378] For example, the invention relating to one of the dependentclaims may not contain part of the structural requirements in any claimto which the one dependent claim belongs. The primary part of theinvention defined by one of the independent claim may be belong to anyother independent claim.

[0379] It is particularly desirable that the parameter for changing theedge line image of the object is the distance between the object and theviewpoint or the size of the perspectively transformed object. However,any other parameter equivalent to these parameters falls within thescope of the invention.

[0380] This embodiment has been described mainly with respect to thecase where the image of the edge line is changed depending on thedistance between the object and the viewpoint or the size of theperspectively transformed object for avoiding such a problem that theedge line image of the object is made unnecessarily conspicuous.

[0381] On the contrary, however, the image of the edge line may bechanged depending on the distance between the object and the viewpointor the size of the perspectively transformed object for making the edgeline image of the object conspicuous. For example, within a certainrange of distance, the edge line may be made more opaque as the distancebetween the object and the viewpoint increases (or the size of theperspectively transformed object decreases). Alternatively, the color ofthe edge line may gradually become a color different from CF (secondcolor) as described, as the distance between the object and theviewpoint increases (or the size of the perspectively transformed objectdecreases).

[0382] The technique of drawing the edge line of the object isparticularly desirable to use the texel interpolation type texturemapping process, but the present invention is not limited to such atechnique. For example, the edge line of the object may be drawn throughsuch a technique as shown in FIGS. 42A to 42P.

[0383] This technique first draws an edge line image 420 (or an imagefilled with the color of the edge line) on a region 410 in which theoriginal image is to be drawn on a drawing region 400 (frame buffer orthe like) at a position deviated upward by several pixels, as shown inFIGS. 42A and 42B, similarly, the edge line image 420 is drawn on theabove region 410 at positions deviated by several pixels in thedownward, rightward and leftward directions, as shown in FIGS. 42C, 42Dand 42E. Finally, the original image 430 is drawn in the same region 410as shown in FIG. 42F.

[0384] Since this technique can draws the edge line only through thetwo-dimensional processing, the processing load on the drawing processorincreases, but the processing load on CPU for performing thethree-dimensional processing can be reduced.

[0385] The function characteristics between the distance between theobject and the viewpoint or the size of the perspectively transformedobject and the color or translucency of the edge line may be in any ofvarious modified forms. For example, the function characteristic may bea curve characteristic using a multi-dimensional function, rather thanthe linear characteristic as shown in FIGS. 5A, 5B, 7A and 7B. Namely,the multi-dimensional function may interpolate between (VTN, CN) and(VTF, CF) or between (VTN, αTN) and (VTF, αTF), rather than the linearinterpolation.

[0386] The number of threshold values may be four or more, as shown inFIGS. 43A and 43B. The number of threshold values is arbitrary.Alternatively, no threshold value may be provided. If the distancebetween the object and the viewpoint or the size of the perspectivelytransformed object is within the range of VTN2 to VTN3 in such a case asshown in FIGS. 34A and 34B, the color or translucency of the edge linemay be maintained substantially constant as described in connection withFIG. 8A.

[0387] The object for generating the image of the edge line is notnecessarily displayed. The display of only the image of the edge linewithout displaying the object also falls within the scope of theinvention. In such a case, any three-dimensional image such as acharacter drawn only by the edge line can be generated. This can providea unique picture effect which would not be known in the art.

[0388] The bi-linear filtering type texture mapping processing isparticularly desirable as the texel interpolation type texture mappingprocess, but the present invention is not limited to such a process.

[0389] It is particularly desirable to use the technique of generatingthe virtual polygon as described in connection with FIGS. 16A to 18D.However, the present invention is not limited to such a technique, butmay be carried out in any of various other forms.

[0390] It is particularly desirable that the determination of the edgeline region in the object is carried out based on the texel-interpolatedalpha value. However, the present invention is not limited to such adetermination, but may be carried out in any of various other forms.

[0391] The present invention may be applied to any of various games suchas fighting games, shooting games, robot combat games, sports games,competitive games, roll-playing games, music playing games, dancinggames and so on.

[0392] Furthermore, the present invention can be applied to various gamesystems (image generating systems) such as arcade game systems, homegame systems, large-scaled multi-player attraction systems, simulators,multimedia terminals, image generating systems, game image generatingsystem boards and so on.

1. A game system which performs image generation, comprising: meanswhich draws an image of an edge line of an object; means which changesthe image of the edge line of the object depending on a distance from aviewpoint; and means which generates an image as viewed from a givenviewpoint within an object space.
 2. The game system according to claim1, wherein as the distance from the viewpoint increases, a color of theedge line of the object gradually becomes a given second color.
 3. Thegame system according to claim 2, wherein when the distance from theviewpoint is substantially equal to a distance when the viewpointfollows the object while maintaining a substantially constant distancefrom the object, the color of the edge line of the object is maintainedsubstantially constant.
 4. The game system according to claim 2, whereinthe color of the edge line of the object is set to the second color whenthe distance from the viewpoint becomes larger than a given thresholdvalue.
 5. The game system according to claim 1, wherein as the distancefrom the viewpoint increases, the image of the edge line of the objectgradually becomes more transparent.
 6. The game system according toclaim 5, wherein when the distance from the viewpoint is substantiallyequal to a distance when the viewpoint follows the object whilemaintaining a substantially constant distance from the object, atranslucency of the edge line of the object is maintained substantiallyconstant.
 7. The game system according to claim 5, wherein the image ofthe edge line of the object substantially disappears when the distancefrom the viewpoint becomes larger than a given threshold value.
 8. Agame system which performs image generation, comprising; means whichdraws an image of an edge line of an object; means which changes theimage of the edge line of the object depending on a size of the objectthat has been perspectively transformed; and means which generates animage as viewed from a given viewpoint within an object space.
 9. Thegame system according to claim 8, wherein as the size of theperspectively transformed object decreases, color of the edge line ofthe object gradually becomes a given second color.
 10. The game systemaccording to claim 9, wherein when the size of the perspectivelytransformed object is substantially equal to a size of the object whenthe viewpoint follows the object while maintaining a substantiallyconstant distance from the object, the color of the edge line of theobject is maintained substantially constant.
 11. The game systemaccording to claim
 9. wherein the color of the edge line of the objectis set to the second color when the size of the perspectivelytransformed object becomes smaller than a given threshold value.
 12. Thegame system according to claim 8, wherein as the size of theperspectively transformed object decreases, the image of the edge lineof the object gradually becomes more transparent.
 13. The game systemaccording to claim 12, wherein when the size of the perspectivelytransformed object is substantially equal to a size of the object whenthe viewpoint follows the object while maintaining a substantiallyconstant distance from the object, a translucency of the edge line ofthe object is maintained substantially constant.
 14. The game systemaccording to claim 12, wherein the image of the edge line of the objectsubstantially disappears when the size of the perspectively transformedobject becomes smaller than a given threshold value.
 15. The game systemaccording to claim 2, wherein the image of the edge line of the objectis drawn in an outside area of edge of the object.
 16. The game systemaccording to claim 9, wherein the image of the edge line of the objectis drawn in an outside area of edge of the object.
 17. The game systemaccording to claim 5, wherein the image of the edge line of the objectis drawn in an inside area of edge of the object.
 18. The game systemaccording to claim 12, wherein the image of the edge line of the objectis drawn in an inside area of edge of the object.
 19. A computer-usableprogram embodied on an information storage medium or in a carrier wave,the program comprising a processing routine for causing a computer torealize: means which draws an image of an edge line of an object; meanswhich changes the image of the edge line of the object depending on adistance from a viewpoint; and means which generates an image as viewedfrom a given viewpoint within an object space.
 20. The program accordingto claim 19, wherein as the distance from the viewpoint increases, acolor of the edge line of the object gradually becomes a given secondcolor.
 21. The program according to claim 20, wherein when the distancefrom the viewpoint is substantially equal to a distance when theviewpoint follows the object while maintaining a substantially constantdistance from the object, the color of the edge line of the object ismaintained substantially constant.
 22. The program according to claim20, wherein the color of the edge line of the object is set to thesecond color when the distance from the viewpoint becomes larger than agiven threshold value.
 23. The program according to claim
 19. wherein asthe distance from the viewpoint increases, the image of the edge line ofthe object gradually becomes more transparent.
 24. The program accordingto claim 23, wherein when the distance from the viewpoint issubstantially equal to a distance when the viewpoint follows the objectwhile maintaining a substantially constant distance from the object, atranslucency of the edge line of the object is maintained substantiallyconstant.
 25. The program according to claim 23, wherein the image ofthe edge line of the object substantially disappears when the distancefrom the viewpoint becomes larger than a given threshold value.
 26. Acomputer-usable program embodied on an information storage medium or ina carrier wave, the program comprising a processing routine for causinga computer to realize: means which draws an image of an edge line of anobject; means which changes the image of the edge line of the objectdepending on a size of the object that has been perspectivelytransformed; and means which generates an image as viewed from a givenviewpoint within an object space.
 27. The program according to claim 26,wherein as the size of the perspectively transformed object decreases,color of the edge line of the object gradually becomes a given secondcolor.
 28. The program according to claim 27, wherein when the size ofthe perspectively transformed object is substantially equal to a size ofthe object when the viewpoint follows the object while maintaining asubstantially constant distance from the object, the color of the edgeline of the object is maintained substantially constant.
 29. The programaccording to claim 27, wherein the color of the edge line of the objectis set to the second color when the size of the perspectivelytransformed object becomes smaller than a given threshold value.
 30. Theprogram according to claim
 26. wherein as the size of the perspectivelytransformed object decreases, the image of the edge line of the objectgradually becomes more transparent.
 31. The program according to claim30, wherein when the size of the perspectively transformed object issubstantially equal to a size of the object when the viewpoint followsthe object while maintaining a substantially constant distance from theobject, a translucency of the edge line of the object is maintainedsubstantially constant.
 32. The program according to claim 30, whereinthe image of the edge line of the object substantially disappears whenthe size of the perspectively transformed object becomes smaller than agiven threshold value.
 33. The program according to claim
 20. whereinthe image of the edge line of the object is drawn in an outside area ofedge of the object.
 34. The program according to claim 27, wherein theimage of the edge line of the object is drawn in an outside area of edgeof the object.
 35. The program according to claim 23, wherein the imageof the edge line of the object is drawn in an inside area of edge of theobject.
 36. The program according to claim 30, wherein the image of theedge line of the object is drawn in an inside area of edge of theobject.
 37. An image generating method to perform image generation,comprising: drawing an image of an edge line of an object; changing theimage of the edge line of the object depending on a distance from aviewpoint; and generating an image as viewed from a given viewpointwithin an object space.
 38. The image generating method according toclaim 37, wherein as the distance from the viewpoint increases, a colorof the edge line of the object gradually becomes a given second color.39. The image generating method according to claim 38, wherein when thedistance from the viewpoint is substantially equal to a distance whenthe viewpoint follows the object while maintaining a substantiallyconstant distance from the object, the color of the edge line of theobject is maintained substantially constant.
 40. The image generatingmethod according to claim 38, wherein the color of the edge line of theobject is set to the second color when the distance from the viewpointbecomes larger than a given threshold value.
 41. The image generatingmethod according to claim 37, wherein as the distance from the viewpointincreases, the image of the edge line of the object gradually becomesmore transparent.
 42. The image generating method according to claim 41,wherein when the distance from the viewpoint is substantially equal to adistance when the viewpoint follows the object while maintaining asubstantially constant distance from the object, a translucency of theedge line of the object is maintained substantially constant.
 43. Theimage generating method according to claim 41, wherein the image of theedge line of the object substantially disappears when the distance fromthe viewpoint becomes larger than a given threshold value.
 44. An imagegenerating method to perform image generation, comprising: means whichdraws an image of an edge line of an object; means which changes theimage of the edge line of the object depending on a size of the objectthat has been perspectively transformed; and means which generates animage as viewed from a given viewpoint within an object space.
 45. Theimage generating method according to claim 44, wherein as the size ofthe perspectively transformed object decreases, color of the edge lineof the object gradually becomes a given second color.
 46. The imagegenerating method according to claim 45, wherein when the size of theperspectively transformed object is substantially equal to a size of theobject when the viewpoint follows the object while maintaining asubstantially constant distance from the object, the color of the edgeline of the object is maintained substantially constant.
 47. The imagegenerating method according to claim 45, wherein the color of the edgeline of the object is set to the second color when the size of theperspectively transformed object becomes smaller than a given thresholdvalue.
 48. The image generating method according to claim 44, wherein asthe size of the perspectively transformed object decreases, the image ofthe edge line of the object gradually becomes more transparent.
 49. Theimage generating method according to claim 48, wherein when the size ofthe perspectively transformed object is substantially equal to a size ofthe object when the viewpoint follows the object while maintaining asubstantially constant distance from the object, a translucency of theedge line of the object is maintained substantially constant.
 50. Theimage generating method according to claim 48, wherein the image of theedge line of the object substantially disappears when the size of theperspectively transformed object becomes smaller than a given thresholdvalue.
 51. The image generating method according to claim 38, whereinthe image of the edge line of the object is drawn in an outside area ofedge of the object.
 52. The image generating method according to claim45, wherein the image of the edge line of the object is drawn in anoutside area of edge of the object.
 53. The image generating methodaccording to claim 41, wherein the image of the edge line of the objectis drawn in an inside area of edge of the object.
 54. The imagegenerating method according to claim 48, wherein the image of the edgeline of the object is drawn in an inside area of edge of the object.